/* home.less - 替换整个文件 */
.home-container2 {
  display: flex;
  height: 100vh;           /* 整个视窗高度 */
  width: 100%;
  overflow: hidden;
  font-family: Arial, sans-serif;
}

/* 左侧 20% 固定宽度 */
.sidebar1 {
  flex: 0 0 16%;           /* 固定占 20% */
  max-width: 16%;
  box-sizing: border-box;
  padding: 16px;
  background: #f5f5f5;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
}

/* 左侧项样式 */
.section-title {
  font-weight: 700;
  margin-bottom: 12px;
  color: #222;
}
.section-item {
  margin: 6px 0;
  cursor: pointer;
  color: #333;
}
.group-list {
  margin-top: 12px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}
.group-item {
  padding: 8px;
  border: 1px solid #e0e0e0;
  margin-bottom: 8px;
  cursor: pointer;
  border-radius: 6px;
  text-align: left;       /* 文本左对齐，避免居中 */
  background: white;
}
.group-item.active {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

/* 右侧占剩余宽度（不再居中）*/
.content {
  flex: 1;                 /* 占用剩余空间 */
  position: relative;
  padding: 12px;
  box-sizing: border-box;
  overflow: auto;          /* 如图较大可滚动 */
  background: #ffffff;
}

/* 平面图容器，占满右侧区域，图片左上对齐 */
.floorplan {
  position: relative;      /* 弹框以此为参照定位 */
  width: 100%;
  height: 100%;
  overflow: auto;
}

/* 图片顶左铺满容器（保持比例） */
.floorplan-img {
  display: block;          /* 去掉图片默认 inline-block 对齐行为 */
  width: 100%;
  height: 100%;
  object-fit: contain;     /* 保持宽高比，若希望填满可改为 cover */
  border: 1px solid #eee;
  background: #fafafa;
}

/* 悬浮弹框（相对于 .floorplan 绝对定位） */
.popup {
  position: absolute;
  top: 20px;               /* 离顶部 20px，可按需调 */
  left: 0;                 /* 相对右侧内容的最左边 */
  margin-left: 1px;
  margin-top: -30px;        /* 推到 sidebar 右边 */
  width: 320px;
  background: #fff;
  padding: 14px;
  border: 1px solid #007bff;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  z-index: 30;
}

/* tabs 与内容样式（保留原样，仅保证不居中）*/
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.tabs button {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ddd;
  background: #f8f8f8;
  cursor: pointer;
  border-radius: 6px;
}
.tabs button.active {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

/* header / power 按钮 */
.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.power-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}
.power-btn.on { background:#28a745; color:#fff; }
.power-btn.off { background:#dc3545; color:#fff; }

/* 表单行 */
.row {
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dim-controls,
.cct-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.switches { display:flex; align-items:center; gap:8px; }

/* footer 按钮 */
.popup-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}
.test-btn {
  background: #007bff;
  color: #fff;
  padding: 7px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
